registerTests([
function LastOrDefault_Test_0()
{
	var myArray = [1, 2, 3];
	var result = myArray.LastOrDefault();
	
	Assert.areEqual(result, 3, "Expected 3 but got " + result);
},
function LastOrDefault_Test_1()
{
	var myArray = [];
	var result = 9;

	Assert.doesntThrowException(function() { result = myArray.LastOrDefault(); }, "Exception was thrown on empty array");
	Assert.isNotDefined(result, "Expected (null) but got " + result);
},
function LastOrDefault_Test_Condition_0()
{
	var myArray = [1, 2, 3];
	var result = myArray.LastOrDefault("x=> x == 2");
	
	Assert.areEqual(result, 2, "Expected 2 but got " + result);
},
function LastOrDefault_Test_Condition_1()
{
	var myArray = [];
	var result = 9;

	Assert.doesntThrowException(function() { result = myArray.LastOrDefault("x => x == 2");}, "Exception was thrown on empty array");
	Assert.isNotDefined(result, "Expected (null) but got " + result);
}
]);